# -*- coding: utf-8 -*-
# @Time    : 2021-05-18 21:04
# @Author  : xiayzuhen
# @File    : 1v1大战.py
# @Email   : 2861526584@qq.com

class actor():
    blood = 100
    def __init__(self,name,sex,equipment):
        self.name = name
        self.sex = sex
        self.equipment = equipment

    def fight(self,name):
        if name.equipment == "有防弹衣":
            name.blood -= 5
            print(f"{name.name}剩{name.blood}血")
        else:
            name.blood -= 10
            print(f"{name.name}剩{name.blood}血")


class room():
    def __init__(self,name):
        self.name = name
        self.name_list = []

    def add_actor(self,name):
        if len(self.name_list) < 2:
            if name in self.name_list:
                print("你已经加入该房间！")
            else:
                self.name_list.append(name)
        else:
            print("房间已满")

actor1 = actor("xyz","女","有防弹衣")
actor2 = actor("lmt","女","无防弹衣")
room = room("浪漫满屋")


while 1:
    actor1.fight(actor2)
    actor2.fight(actor1)
    if actor1.blood < 0:
        print(f"{actor1.name}被打败")
        break
    elif actor2.blood < 0:
        print(f"{actor2.name}被打败")
        break
